<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改配置信息')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-configuration-edit" th:object="${sysConfiguration}">
            <input name="configurationId" th:field="*{configurationId}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">rsi发送频率：</label>
                <div class="col-sm-8">
                    <input name="configurationSendFrequencyRsi" th:field="*{configurationSendFrequencyRsi}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">地图发送频率：</label>
                <div class="col-sm-8">
                    <input name="configurationSendFrequencyMap" th:field="*{configurationSendFrequencyMap}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">spat发送频率：</label>
                <div class="col-sm-8">
                    <input name="configurationSendFrequencySpat" th:field="*{configurationSendFrequencySpat}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">消息可用性(0可用,1不可用)：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('sys_message_usability')}">
                        <input type="radio" th:id="${'configurationMessageenable_' + dict.dictCode}" name="configurationMessageenable" th:value="${dict.dictValue}" th:field="*{configurationMessageenable}">
                        <label th:for="${'configurationMessageenable_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">心跳url：</label>
                <div class="col-sm-8">
                    <input name="configurationHeartbeatUrl" th:field="*{configurationHeartbeatUrl}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">状态上报url：</label>
                <div class="col-sm-8">
                    <input name="configurationStatusreportUrl" th:field="*{configurationStatusreportUrl}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">参数刷新url：</label>
                <div class="col-sm-8">
                    <input name="configurationConfigrefreshUrl" th:field="*{configurationConfigrefreshUrl}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">ota请求url：</label>
                <div class="col-sm-8">
                    <input name="configurationOtarequestUrl" th:field="*{configurationOtarequestUrl}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">rsi升级需求：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('sys_updata_request')}">
                        <input type="radio" th:id="${'configurationRsineedupdate_' + dict.dictCode}" name="configurationRsineedupdate" th:value="${dict.dictValue}" th:field="*{configurationRsineedupdate}">
                        <label th:for="${'configurationRsineedupdate_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">rsi升级url：</label>
                <div class="col-sm-8">
                    <input name="configurationRsiupdateurl" th:field="*{configurationRsiupdateurl}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">spat升级需求：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('sys_updata_request')}">
                        <input type="radio" th:id="${'configurationSpatneedupdate_' + dict.dictCode}" name="configurationSpatneedupdate" th:value="${dict.dictValue}" th:field="*{configurationSpatneedupdate}">
                        <label th:for="${'configurationSpatneedupdate_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">spat升级url：</label>
                <div class="col-sm-8">
                    <input name="configurationSpatupdateurl" th:field="*{configurationSpatupdateurl}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">地图升级需求：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('sys_updata_request')}">
                        <input type="radio" th:id="${'configurationMapneedupdate_' + dict.dictCode}" name="configurationMapneedupdate" th:value="${dict.dictValue}" th:field="*{configurationMapneedupdate}">
                        <label th:for="${'configurationMapneedupdate_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">地图升级url：</label>
                <div class="col-sm-8">
                    <input name="configurationMapupdateurl" th:field="*{configurationMapupdateurl}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "system/configuration";
        $("#form-configuration-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-configuration-edit').serialize());
            }
        }
    </script>
</body>
</html>